package ActionButtons
{
	import flash.display.Sprite;
	import flash.text.TextField;
	import flash.text.TextFieldAutoSize;
	
	public class BuyAttacker implements IActionButton
	{
		public var display:Sprite = new Sprite();
		public var homeBase:HomeBase;
		
		public function BuyAttacker()
		{
			display = VTUtil.getRoundedRect(50,50);
			var tf:TextField = new TextField();
			tf.text = 'Attack';
			tf.autoSize = TextFieldAutoSize.LEFT;
			display.addChild(tf);
		}
		
		public function getCooldownLeft():Number{
			return 0;
		}
		
		public function canDoAction():Boolean{
			return (homeBase.gasGathered >= 30);
		}
		
		public function doAction():void{
			homeBase.createAttacker();
		}
	}
}